import React, { render, Component } from './react'

const root = document.getElementById('root')

const jsx = (
  <div>
    <p>Hello React</p>
    <h1>Hello Fiber</h1>
  </div>
)
// render(jsx, root)
setTimeout(() => {
  const jsx = (
    <div>
      <h1>Hello Fiber</h1>
    </div>
  )
  // render(jsx, root)
}, 2000)
class Hello extends Component {
  constructor(props) {
    super(props)
  }
  render() {
    return <div>类组件Hello</div>
  }
}
class Greating extends Component {
  constructor(props) {
    super(props)
  }
  render() {
    return <Hello />
  }
}

render(<Greating />, root)

function FnComponent(props) {
  return <div>函数组件FnComponent————{props.title}</div>
}

// render(<FnComponent title="函数组件props" />, root)
